<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
        {% if user.is_authenticated %}
        <p>欢迎{{ user.username|default:'游客' }}</p>
        <p><a  href="{% url 'teacher:logout' %}">安全退出</a></p>
        {% endif %}
        {% if perms.teacher %}
	<p>判断登录用户是否用于teacher app的权限</p>
{% if perms.teacher.view_student %}
<p>判断登录用户是否用于teacher.view_student的权限</p>
{% endif %}
{% endif %}
{#    {% else %}#}
{#        <p>欢迎{{ name }}</p>#}
{#        <p><a type="button" href="{% url 'teacher:login' %}">请登录</a></p>#}
{#    {% endif %}#}
</body>
</html>